<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="common/common::common('修改字典数据表')"/>
<script src="/static/base/dict/data/edit.js" charset="utf-8"></script>
</head>
<body>

<form class="layui-form layui-form-pane" id="editBaseDictDataForm" th:object="${baseDictData}">
    <div class="layui-form-body">
        <div class="layui-form-item">
            <label for="dictLabel" class="layui-form-label">字典标签 <span style="color: red">*</span></label>
            <div class="layui-input-block">
                <input type="text" id="dictLabel" name="dictLabel" maxlength="50"
                       th:field="*{dictLabel}" lay-verify="required" autocomplete="off"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="dictValue" class="layui-form-label">字典键值 <span style="color: red">*</span></label>
            <div class="layui-input-block">
                <input type="text" id="dictValue" name="dictValue" maxlength="10"
                       th:field="*{dictValue}" lay-verify="required" autocomplete="off"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="dictSort" class="layui-form-label">字典排序 <span style="color: red">*</span></label>
            <div class="layui-input-block">
                <input type="text" id="dictSort" name="dictSort" maxlength="2"
                       oninput="value=value.replace(/[^\d]/g,'')"
                       th:field="*{dictSort}" lay-verify="required" autocomplete="off"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="status" class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <select id="status" name="status"
                        th:with="type=${@dict.getType('dict_data_status')}">
                    <option th:each="dict : ${type}"
                            th:selected="${dict.dictValue eq baseDictData.status}"
                            th:text="${dict.dictLabel}"
                            th:value="${dict.dictValue}"></option>
                </select>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label for="remark" class="layui-form-label" style="margin-bottom: 0;">描述</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入描述" th:utext="*{remark}" autocomplete="off" maxlength="200" id="remark"
                          name="remark" class="layui-textarea"></textarea>
            </div>
        </div>
    </div>
    <div class="form-footer">
        <button type="button" class="button-sub" lay-submit lay-filter="editBaseDictData">提交</button>
        <button type="button" class="button-close" id="buttonClose">关闭</button>
    </div>
    <input type="text" th:value="*{id}" id="id" name="id" style="visibility: hidden;">
    <input type="text" th:value="*{dictType}" id="dictType" name="dictType" style="visibility: hidden;">
</form>

</body>
</html>